(describe-variable): Mention if the variable is an alias.
authorPavel Janík <Pavel@Janik.cz>
Fri, 12 Jul 2002 08:56:12 +0000 (08:56 +0000)
committerPavel Janík <Pavel@Janik.cz>
Fri, 12 Jul 2002 08:56:12 +0000 (08:56 +0000)
lisp/help-fns.el

index f62443ef152e6fcf2db9794460156b4a75753981..d4daa2fa11c265b4d00ff8ae3db7fc4901839cdd 100644 (file)
@@ -438,7 +438,16 @@ it is displayed along with the global value."
                (terpri)))
            (let ((doc (documentation-property variable 'variable-documentation)))
              (princ (or doc "Not documented as a variable.")))
-         
+           
+           ;; Mention if the variable is an alias.
+           (let ((alias (condition-case nil
+                            (indirect-variable variable)
+                          (error variable))))
+             (unless (eq alias variable)
+               (terpri)
+               (terpri)
+               (princ (format "This variable is an alias for `%s'." alias))))
+           
            ;; Make a link to customize if this variable can be customized.
            ;; Note, it is not reliable to test only for a custom-type property
            ;; because those are only present after the var's definition